<!DOCTYPE html>
<html lang="en" xmlns:th="http://www.thymeleaf.org">
<head>
    <meta charset="UTF-8">
    <title>Thymeleaf模板引擎</title>
    <!-- 链接表达式 -->
    <link th:href="@{/static/index.css}">
</head>
<body>
  <h2>SpringMVC框架集成Thymeleaf模板引擎.</h2>
    <h3 th:text="${title}"></h3>
  <input type="text" th:value="${val}">
  <br>
    <input type="radio" value="male" th:checked="${checked}">男
    <input type="radio" value="female">女
  <br>
    <select>
        <option value="01">HTML</option>
        <option value="02" th:selected="${selected}">CSS</option>
        <option value="03">JS</option>
    </select>
  <br>
<a th:href="@{/thymeleaf/param(id='123')}">有参链接</a>
  <br>
<img th:src="@{/static/img01.png}"/>
  <br>
<span th:if="${boolVal}">
    if语句
</span>

  <div th:switch="${cond}">
      <span th:case="'1'">
          情况1
      </span>
      <span th:case="'2'">
          情况2
      </span>
      <span th:case="*">
          case的不匹配的情况
      </span>
  </div>

<ul>
    <li th:each="user : ${list}">
        <span th:text="${user.username}"></span>
    </li>
</ul>
</body>
</html>
